<?php
$arr=[
    ['id'=>1,'bookname'=>'诺亚方舟','name'=>'诺亚','age'=>'45'],
    ['id'=>2,'bookname'=>'天方夜谭','name'=>'天凡','age'=>'35']
];
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <table border="1px">
    <tr>
        <td>姓名</td>
        <td>年龄</td>
    </tr>
    <?php foreach($arr as $v){ ?>
        <tr>
            <td><?php echo $v['name'] ?></td>
            <td><?php echo $v['age'] ?></td>
        </tr>
    <?php }?>
    </table>
</body>
</html>